package cn.darkhorse.device.service.impl;

import cn.darkhorse.device.pojo.MesCheckPlanUser;
import cn.darkhorse.device.mapper.MesCheckPlanUserMapper;
import cn.darkhorse.device.service.MesCheckPlanUserService;
import cn.darkhorse.device.vo.MesCheckPlanUserVO;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 点检计划设备关联表 服务实现类
 * </p>
 *
 * @author maoguanjun
 * @since 2022-12-06
 */
@Service
public class MesCheckPlanUserServiceImpl extends ServiceImpl<MesCheckPlanUserMapper, MesCheckPlanUser> implements MesCheckPlanUserService {

    @Resource
    private MesCheckPlanUserMapper mesCheckPlanUserMapper;
    /**
     * 根据名称查询用户id集合
     *
     * @param name
     * @return
     */
    @Override
    public List<Long> queryByName(String name) {
        return mesCheckPlanUserMapper.queryByName(name);
    }

    /**
     * 根据任务Id和type查询人员
     *
     * @param planId
     * @param type
     * @return
     */
    @Override
    public List<MesCheckPlanUserVO> getList(Long planId, Integer type) {
        return mesCheckPlanUserMapper.getList(planId,type);
    }
}
